#include <stdio.h>

int main()
{
    double input = 0.0;
    //识别连续多个空格
    int blankNum = 0;
    while ((input = getchar()) != EOF)
    {
        if(input != ' '){
            putchar(input);
            blankNum = 0;
        }
        if(input == ' '){
            if(blankNum == 0)
                putchar(input);
                ++ blankNum;
        }
    }
    
    return 0;
}
